/PROG  PNS0030
/ATTR
OWNER		= MNEDITOR;
COMMENT		= "B02-1110/1112";
PROG_SIZE	= 3797;
CREATE		= DATE 24-08-17  TIME 08:29:14;
MODIFIED	= DATE 24-11-08  TIME 11:25:36;
FILE_NAME	= PNS0027;
VERSION		= 0;
LINE_COUNT	= 135;
MEMORY_SIZE	= 4369;
PROTECT		= READ_WRITE;
TCD:  STACK_SIZE	= 0,
      TASK_PRIORITY	= 50,
      TIME_SLICE	= 0,
      BUSY_LAMP_OFF	= 0,
      ABORT_REQUEST	= 0,
      PAUSE_REQUEST	= 0;
DEFAULT_GROUP	= 1,*,*,*,*;
CONTROL_CODE	= 00000000 00000000;
/APPL
/MN
   1:  !******************************** ;
   2:  !     COSMA METAL FORMING  ;
   3:  !******************************** ;
   4:  !  LINE: CHINA CHANGSHA ;
   5:  !  ROBOT: RL1 ;
   6:  !  PROGRAM: PNS0047 ;
   7:  !  PART:53160691/93 ;
   8:  !******************************** ;
   9:   ;
  10:  !INITIALIZE ;
  11:  MOVE TO HOME    ;
  12:  R[14]=90    ;
  13:  R[18]=1    ;
  14:  R[19]=.2    ;
  15:  R[35]=TIMER[4]    ;
  16:  !------------------------------- ;
  17:  !BEGINNING OF PROGRAM ;
  18:  CALL PARTDROP    ;
  19:  COL GUARD ADJUST R[14] ;
  20:  UTOOL_NUM=1 ;
  21:  UFRAME_NUM=0 ;
  22:  PAYLOAD[1] ;
  23:  CALL ARM_CHECK    ;
  24:  !INITIATE TO PICK-POUNCE ;
  25:J P[1:MIDDLE] 50% CNT100 ACC100    ;
  26:J P[2:PICK POUNCE] 50% CNT100 ACC100    ;
  27:  DO[43]=PULSE,1.0sec ;
  28:  R[1]=0    ;
  29:  TIMER[1]=RESET ;
  30:  TIMER[1]=START ;
  31:   ;
  32:  LBL[10:TOP OF LOOF] ;
  33:  OVERRIDE=R[5] ;
  34:   ;
  35:  TIMER[2]=STOP ;
  36:  R[1]=R[1]+1    ;
  37:  R[2]=TIMER[2]    ;
  38:  R[3]=60/R[2]    ;
  39:  TIMER[2]=RESET ;
  40:  TIMER[2]=START ;
  41:   ;
  42:  !PROCEED TO PICK ;
  43:  LBL[20] ;
  44:  IF DI[1]=ON AND DI[8]=ON,JMP LBL[25] ;
  45:  IF DI[29]=ON,JMP LBL[90] ;
  46:  JMP LBL[20] ;
  47:   ;
  48:  LBL[25] ;
  49:  OVERRIDE=R[5] ;
  50:   ;
  51:J P[3:PICK APPROACH] 100% CNT100 ACC100    ;
  52:   ;
  53:  DO[1]=OFF ;
  54:J P[4:PICK_L] 50% CNT0 TB R[18]sec,CALL PARTPICK_L ACC100 BREAK    ;
  55:  PAYLOAD[2] ;
  56:  CALL CHK_PICK_L    ;
  57:   ;
  58:J P[15] 50% CNT50    ;
  59:   ;
  60:J P[6:PICK APPROACH] 50% CNT50 ACC100    ;
  61:  DO[1]=OFF ;
  62:J P[14:PICK_R] 50% CNT0 TB R[18]sec,CALL PARTPICK_R ACC100 BREAK    ;
  63:J P[5:PICK DEPART] 100% CNT50    ;
  64:  PAYLOAD[2] ;
  65:  CALL CHK_PICK    ;
  66:   ;
  67:  DO[44]=PULSE,1.0sec ;
  68:  CALL CHECK_PICK    ;
  69:  DO[1]=ON ;
  70:  DO[8]=PULSE,1.0sec ;
  71:  MONITOR Z_CHECH ;
  72:J P[7:PICK CLEAR] 100% CNT100 ACC100 DB  500.0mm,CALL END_PICK    ;
  73:   ;
  74:  LBL[30:GOTO DROP POUNCE] ;
  75:J P[8:DROP POUNCE] 100% CNT100 ACC100    ;
  76:  OVERRIDE=R[5] ;
  77:   ;
  78:  LBL[40:AT DROP POUNCE] ;
  79:  IF DI[2]=ON AND DI[4]=ON AND DI[5]=ON,JMP LBL[80] ;
  80:  IF DI[7]=ON AND DI[2]=ON,JMP LBL[50] ;
  81:  IF DI[18]=ON,JMP LBL[60] ;
  82:  JMP LBL[40] ;
  83:   ;
  84:  LBL[50:MOVE DROP SNEAK] ;
  85:  OVERRIDE=R[5] ;
  86:J P[9:DROP SNEAK] 100% CNT100 ACC100    ;
  87:  LBL[51:DROP OR C-P-S] ;
  88:  IF DI[2]=ON AND DI[4]=ON AND DI[5]=ON,JMP LBL[80] ;
  89:  IF DI[18]=ON,JMP LBL[40] ;
  90:  JMP LBL[51] ;
  91:  JMP LBL[50] ;
  92:   ;
  93:  LBL[60:MOVE CLS-PRS-ACC] ;
  94:J P[1:MIDDLE] 50% CNT100 ACC100    ;
  95:  PAUSE ;
  96:  JMP LBL[30] ;
  97:   ;
  98:  LBL[80:DROP ENABLED] ;
  99:  !PROCEED TO DROP ;
 100:  TIMER[4]=RESET ;
 101:  TIMER[4]=START ;
 102:   ;
 103:  DO[4]=OFF ;
 104:  OVERRIDE=R[5] ;
 105:J P[10:DROP APPROACH] 30% CNT10 ACC100    ;
 106:  MONITOR END Z_CHECH ;
 107:J P[11:DROP] 30% CNT5 TB R[19]sec,CALL PARTDROP_L ACC110 BREAK    ;
 108:J P[10:DROP APPROACH] 100% CNT80    ;
 109:J P[20:DROP2 A] 100% CNT40    ;
 110:  //DO[1]=OFF ;
 111:J P[21:DROP] 50% CNT3 TB R[18]sec,CALL PARTDROP_R ACC100 BREAK    ;
 112:J P[20:DROP2 A] 100% CNT40    ;
 113:  PAYLOAD[1] ;
 114:  CALL CHK_DROP    ;
 115:  OVERRIDE=R[5] ;
 116:J P[12:DROP DEPART] 100% CNT100 ACC100    ;
 117:  DO[6]=PULSE,1.0sec ;
 118:  TIMER[4]=STOP ;
 119:J P[13:DROP CLEAR] 100% CNT100 ACC130    ;
 120:  DO[7]=PULSE,1.0sec ;
 121:  DO[43]=PULSE,1.0sec ;
 122:   ;
 123:  !GOTO PICK POUNCE ;
 124:J P[2:PICK POUNCE] 100% CNT100 ACC100    ;
 125:  //DO[43]=PULSE,1.0sec ;
 126:  IF DI[29]=ON,JMP LBL[90] ;
 127:  JMP LBL[10] ;
 128:   ;
 129:  LBL[90:END OF CYCLE] ;
 130:  TIMER[1]=STOP ;
 131:  R[4]=TIMER[1]    ;
 132:J P[1:MIDDLE] 50% CNT100    ;
 133:  MOVE TO HOME    ;
 134:   ;
 135:  LBL[100:END OF PROGRAM] ;
/POS
P[1:"MIDDLE"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2613.039  mm,	Y =    16.985  mm,	Z =  -680.000  mm,
	W =  -179.895 deg,	P =     -.122 deg,	R =   -90.003 deg
};
P[2:"PICK POUNCE"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2658.694  mm,	Y =  -175.896  mm,	Z =  -807.970  mm,
	W =  -179.417 deg,	P =      .013 deg,	R =   -90.019 deg
};
P[3:"PICK APPROACH"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2469.216  mm,	Y =   -93.996  mm,	Z =  -939.971  mm,
	W =  -179.415 deg,	P =      .009 deg,	R =   -90.021 deg
};
P[4:"PICK_L"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2469.500  mm,	Y =   -94.892  mm,	Z = -1016.161  mm,
	W =  -179.415 deg,	P =      .008 deg,	R =   -90.017 deg
};
P[5:"PICK DEPART"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2849.755  mm,	Y =   345.854  mm,	Z =  -868.027  mm,
	W =  -179.418 deg,	P =      .009 deg,	R =   -90.017 deg
};
P[6:"PICK APPROACH"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2849.750  mm,	Y =   345.949  mm,	Z =  -935.055  mm,
	W =  -179.419 deg,	P =      .008 deg,	R =   -90.016 deg
};
P[7:"PICK CLEAR"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2826.148  mm,	Y =  -228.890  mm,	Z =  -788.260  mm,
	W =  -179.652 deg,	P =      .276 deg,	R =   -89.784 deg
};
P[8:"DROP POUNCE"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2795.303  mm,	Y =  -981.917  mm,	Z =  -829.279  mm,
	W =   179.852 deg,	P =      .370 deg,	R =   -88.458 deg
};
P[9:"DROP SNEAK"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2460.760  mm,	Y = -2230.089  mm,	Z =  -849.043  mm,
	W =   179.520 deg,	P =      .782 deg,	R =   -89.029 deg
};
P[10:"DROP APPROACH"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2546.485  mm,	Y = -3440.202  mm,	Z =  -910.517  mm,
	W =   179.795 deg,	P =    -1.307 deg,	R =   -90.689 deg
};
P[11:"DROP"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2546.484  mm,	Y = -3440.202  mm,	Z =  -967.317  mm,
	W =   179.795 deg,	P =    -1.307 deg,	R =   -90.689 deg
};
P[12:"DROP DEPART"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2835.339  mm,	Y = -3005.848  mm,	Z =  -938.243  mm,
	W =  -179.934 deg,	P =     -.598 deg,	R =   -84.417 deg
};
P[13:"DROP CLEAR"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2771.165  mm,	Y = -1485.720  mm,	Z =  -850.000  mm,
	W =   179.527 deg,	P =     1.154 deg,	R =   -89.332 deg
};
P[14:"PICK_R"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2849.837  mm,	Y =   345.785  mm,	Z = -1020.250  mm,
	W =  -179.418 deg,	P =      .009 deg,	R =   -90.017 deg
};
P[15]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2469.122  mm,	Y =   -93.823  mm,	Z =  -940.063  mm,
	W =  -179.418 deg,	P =      .010 deg,	R =   -90.021 deg
};
P[20:"DROP2 A"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2795.276  mm,	Y = -3385.648  mm,	Z =  -923.930  mm,
	W =   179.628 deg,	P =    -1.388 deg,	R =   -81.743 deg
};
P[21:"DROP"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2795.277  mm,	Y = -3385.648  mm,	Z =  -993.627  mm,
	W =   179.628 deg,	P =    -1.388 deg,	R =   -81.743 deg
};
/END
